From: Niklas Laxström Date: Sat, 10 May 2008 10:10:52 +0000 (+0000) Subject: * Use Xml:: functions and remove the huge warning about escaping X-Git-Tag: 1.31.0-rc.0~47748 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=fb6d3a45f881106bb57c59dc496aaf032f809f64;p=lhc%2Fweb%2Fwiklou.git * Use Xml:: functions and remove the huge warning about escaping --- diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 13b021c71d..1710e33f57 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -135,25 +135,11 @@ class PageHistory { * @return string HTML output */ function beginHistoryList() { - global $wgTitle; + global $wgTitle, $wgScript; $this->lastdate = ''; $s = wfMsgExt( 'histlegend', array( 'parse') ); - $s .= '
'; - $prefixedkey = htmlspecialchars($wgTitle->getPrefixedDbKey()); - - // The following line is SUPPOSED to have double-quotes around the - // $prefixedkey variable, because htmlspecialchars() doesn't escape - // single-quotes. - // - // On at least two occasions people have changed it to single-quotes, - // which creates invalid HTML and incorrect display of the resulting - // link. - // - // Please do not break this a third time. Thank you for your kind - // consideration and cooperation. - // - $s .= "\n"; - + $s .= Xml::openElement( 'form', array( 'action' => $wgScript ) ); + $s .= Xml::hidden( 'title', $wgTitle->getPrefixedDbKey() ); $s .= $this->submitButton(); $s .= '